/*河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
*/
package cn.javaxc.psi.action.supplychainmana;
import java.io.*;
import java.util.*;
import java.sql.*;
import cn.javaxc.model.base.SQL;
import cn.javaxc.model.base.SQLList;
import cn.javaxc.model.base.SQLMap;
import cn.javaxc.model.base.SQLParam;
import cn.javaxc.model.page.BatisPage;
import cn.javaxc.mvcwork.controller.web.TreeBean;
import cn.javaxc.mvcwork.util.common.CommonUtil;
import cn.javaxc.mvcwork.util.common.MapListUtil;
import cn.javaxc.mvcwork.util.helper.FrameHelper;
import cn.javaxc.mvcwork.util.helper.TreeTableHelper;
import org.springframework.beans.factory.annotation.Autowired;
import cn.javaxc.system.action.base.BaseAction;
import cn.javaxc.psi.mapper.supplychainmana.SupplierUpdateMapper;
public class SupplierUpdate extends BaseAction
{
    @Autowired(required=false)
	private SupplierUpdateMapper mapper;
    /**
    修改账号
    */
    
    public Map supplierUpdate() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        SQLList<SQLMap> phone=mapper.phone(params);
        result.put("phone", phone);
        
        
        SQLList<SQLMap> message=mapper.message(params);
        SQLMap message_emt=message.getExistfirst();
        result.put("message", message_emt);
        
        
        SQLList<SQLMap> address=mapper.address(params);
        SQLMap address_emt=address.getExistfirst();
        result.put("address", address_emt);
        
        
        SQLList<SQLMap> email_info=mapper.email_info(params);
        result.put("email_info", email_info);
        
        
        SQLList<SQLMap> clienttype=mapper.clienttype(params);
        result.put("clienttype", clienttype);
        
        
        SQLList<SQLMap> clientmode=mapper.clientmode(params);
        result.put("clientmode", clientmode);
        
        
        SQLList<SQLMap> clientorigin=mapper.clientorigin(params);
        result.put("clientorigin", clientorigin);
        
        
        SQLList<SQLMap> clientrate=mapper.clientrate(params);
        result.put("clientrate", clientrate);
        
        
        SQLList<SQLMap> clientbus=mapper.clientbus(params);
        result.put("clientbus", clientbus);
        
        
        SQLList<SQLMap> phonetype=mapper.phonetype(params);
        result.put("phonetype", phonetype);
        
        
        SQLList<SQLMap> emailtype=mapper.emailtype(params);
        result.put("emailtype", emailtype);
        
        return result;
    }
    /**
    修改账号修改
    */
    
    public Map supplierUpdateSubmit() {
        
        Map result=new HashMap();
        SQLParam params=new SQLParam(request,result);
        
        int supplierUpdate_client_message = mapper.supplierUpdate_client_message(params);
        result.put("supplierUpdate_client_message", supplierUpdate_client_message);
        
        
        for (SQLMap emt:hqlBean.getTableElements("phones")){
            params=new SQLParam(request,emt.getMap());
            mapper.supplierUpdate_phones(params);
        }
        
        
        int supplierUpdate_address = mapper.supplierUpdate_address(params);
        result.put("supplierUpdate_address", supplierUpdate_address);
        
        
        for (SQLMap emt:hqlBean.getTableElements("email")){
            params=new SQLParam(request,emt.getMap());
            mapper.supplierUpdate_email(params);
        }
        
        return result;
    }
}